package com.yzcrm.erp.finance.controller;

import com.jfinal.aop.Inject;
import com.jfinal.core.Controller;
import com.yzcrm.common.config.paragetter.BasePageRequest;
import com.yzcrm.erp.finance.service.FinanceBackLogService;
import com.yzcrm.erp.psi.service.PsiBackLogService;
import com.yzcrm.swagger.annotation.ActionApi;
import com.yzcrm.swagger.annotation.Api;
import com.yzcrm.swagger.annotation.Param;
import com.yzcrm.swagger.annotation.Params;

/**
 * @author jiang.xue
 */
@Api(remark = "财务：待办事项")
public class FinanceBackLogController extends Controller {

    @Inject
    FinanceBackLogService financeBackLogService;

    /**
     * 采购申请待办事项数量统计
     */
    @ActionApi(summary = "采购申请待办事项数量统计", remark="采购申请待办事项数量统计")
    public void num(){
        renderJson(financeBackLogService.num());
    }

    /**
     * 待审核采购申请
      * @param basePageRequest
     */
    @ActionApi(summary = "待审核采购申请", remark="待审核采购申请")
    @Params({
            @Param(name="checkType", remark="1:待审核  2:已审核", dataType="int", defaultValue="", required=true),
            @Param(name="type", remark="模块 label 51办公用品officePurchase 52常规备货normalPurchase 53项目备货projectPurchase 54研发用品devPurchase 55 其它otherPurchase", dataType="int", defaultValue="", required=true)
    })
    public void checkEnterLeaveStock(BasePageRequest basePageRequest) {
        renderJson(financeBackLogService.checkPurchase(basePageRequest));
    }

}
